import { IObject, udp } from '@cscec/udp-mobile-ui';
/**
 * 获取文章列表
 * @param param 参数
 * @returns
 */
export async function getList({ pageIndex, pageSize, ...queryFilter }: IObject) {
    try {
        const {
            code,
            data: { list: record, total }
        } = await udp.request.body({
            url: '/api/article/list',
            data: {
                pageIndex,
                pageSize,
                queryfilter: queryFilter
            }
        });
        return code === 200 ? { total, record } : { total: 0, record: [] };
    } catch (e) {
        return { total: 0, record: [] };
    }
}